<?php

class Damages_Methods_Data_Dictionary_Brand {

  /**
   *
   * @var int 
   */
  public $id;

  /**
   *
   * @var string 
   */
  public $code;

  /**
   *
   * @var string 
   */
  public $name;

  /**
   *
   * @var string 
   */
  public $contactEmail;

  /**
   *
   * @var string 
   */
  public $created;

  /**
   *
   * @var string 
   */
  public $modified;

  /**
   *
   * @var Damages_Methods_Data_Dictionary_Discount[] 
   */
  public $discounts = array();

  public function __construct(DamagesDictBrands $obj) {
    $this->id = $obj->getId();
    $this->code = $obj->getCode();
    $this->name = $obj->getName();
    $this->contactEmail = $obj->getContactEmail();
    $this->created = $obj->getCreated();
    $this->modified = $obj->getModified();
    foreach ($obj->getDictDiscountss() as $discountObj) {
      if ($discountObj->getIsDeleted() === 0)
        $this->discounts[] = new Damages_Methods_Data_Dictionary_Discount($discountObj);
    }
  }

}